package com.atcumt.alibaba;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;


public class Test04 {
    
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        long[] nums = new long[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextLong();
        }
        Arrays.sort(nums);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add((int) nums[i]);
        }
        solve(list, n, k);
        System.out.println(list.size());

    }

    private static void solve(List<Integer> nums, int n, int k) {
        long sum = 0;
        for (int i = 0; i < nums.size(); i++) {
            sum += nums.get(i);
        }
        float avg = sum / n;
        if (nums.get(nums.size())> (avg * k)) {
            nums.remove(nums.size());
        } else {
            return;
        }
        
        solve(nums, n - 1, k);
    }

        /* 
     * 01背包
     */
    public int maxScore (int energy, int[][] actions) {
        // write code here
        int n = actions.length;
        int [] action = new int[n];
        int [] score = new int[n];
        for (int i = 0; i < n; i++) {
            action[i] = actions[i][0];
            score[i] = actions[i][1];
        }
        int res = solve(action, score, energy);
        return res;
        
    }
    public static int solve (int[] weight, int[] value, int bagWeight){
        int[] dp = new int[bagWeight + 1];
        for (int i = 0; i < weight.length; i++) {
            for (int j = bagWeight; j >= weight[i]; j--) {
                if (j >= weight[i]) {
                    dp[j] = Math.max(dp[j], dp[j - weight[i]] + value[i]);
                }
            }
        }
        return dp[weight.length];
    }
}
